#ifndef DICTIONARY_H
#define DICTIONARY_H

#define TABLE_SIZE 100

// 定义字典项结构体
struct DictItem {
    char *key;
    char *value;
    struct DictItem *next;
};

// 定义字典（哈希表）结构体
struct Dictionary {
    struct DictItem *table[TABLE_SIZE];
};

// 函数声明
struct Dictionary* createDictionary();
void insert(struct Dictionary *dict, const char *key, const char *value);
char* search(struct Dictionary *dict, const char *key);
void delete(struct Dictionary *dict, const char *key);
void printDictionary(struct Dictionary *dict);
void destroyDictionary(struct Dictionary *dict);

#endif // DICTIONARY_H
